package edu.spec.wechat.model;

/**
 * Created by MadFrog on 2016/11/3.
 */
public class DuplicateMessage {
    private String msgId;
    private Long arrivalTime;

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public Long getArrivalTime() {
        return arrivalTime;
    }

    public void setArrivalTime(Long arrivalTime) {
        this.arrivalTime = arrivalTime;
    }

    public DuplicateMessage() {
    }

    public DuplicateMessage(String msgId) {
        this.msgId = msgId;
        this.arrivalTime = System.currentTimeMillis();
    }

    @Override
    public boolean equals(Object obj) {
        DuplicateMessage dm = (DuplicateMessage)obj;
        if(dm.getMsgId()==this.getMsgId()){
            return true;
        }
        return false;
    }
}
